package hotgammon.domain;

import hotgammon.view.*;
import minidraw.standard.*;
import minidraw.framework.*;
import java.awt.*;
import javax.swing.*;

public class HotgammonFactory implements Factory {
    protected Board board = new BoardHotgammon();
    protected Dice dice;
    protected Move move;
    protected Winner winner;
    
    public DrawingView view;
    public Drawing drawing;
    
    public HotgammonFactory() {
        drawing = new BackgammonDrawing();
        init();
    }
    
    public void init() {
    }
    
    public Board getBoard() {
        return this.board;
    }
    
    public Dice getDice() {
        return this.dice;
    }
    
    public Move getMove() {
        return this.move;
    }
    
    public Winner getWinner() {
        return this.winner;
    }
    
    public DrawingView createDrawingView( DrawingEditor editor ) {
        ImageManager im = ImageManager.getSingleton();
        view = new StdViewWithBackground(editor, im.getImage("board"));
        return view;
    }
    
    public Drawing createDrawing( DrawingEditor editor ) {
        return drawing;
    }
    
    public JTextField createStatusField( DrawingEditor editor ) {
        return new JTextField("hello world");
    }
}
